Road Map to QuickTime 3

Movie Controller Components

This chapter describes movie controller components. Movie controllers provide a user interface for playing and editing movies, eliminating much of the complexity of working with movies. Movie controllers are implemented in QuickTime as components. This allows customized controllers to be plugged in to QuickTime for use by your application.

If you are developing an applcation that can play movies, consider using a movie controller component to simplify your task. You should already be familiar with QuickTime movies and the concept of components before reading this chapter.

If you are developing a movie controller component, information listed in this chapter describes the interface that your component must support. In addition, you should be familiar with the material in the chapter "Component Manager."

About Movie Controller Components

Inside Macintosh describes the capabilities of movie controller components in general and discusses the movie controller component supplied by Apple. Most developers need to be familiar with this material. The topics discussed include

Spatial Properties

Inside Macintosh discusses the display regions that are supported by movie controller components: boundary regions, boundary rectangles, and clipping regions. Your application can manipulate these regions to determine how the controller is displayed. If your application will use a controller component to display movies, you should read this section.

Playing Movies

Inside Macintosh provides sample code showing how to use the standard movie controller component to play a movie. Code is included for opening a movie file selection dialog, opening the selected movie file, and playing the movie.

Customizing Movie Controllers

Inside Macintosh describes how to customize an existing movie controller by adding an action filter function to your application. An action filter function is called by the movie controller component, allowing your application to react to movie controller events. Sample code is provided for an action filter function that resizes the window whenever the user hides the controller.

Changing the Shape of the Cursor

QuickTime 3 Reference describes the issues that need to be considered when changing the shape of the cursor within an application that contains a movie controller component. For example, the movie controller component may change the cursor shape when the cursor is within the controller's boundary region, and this can conflict with a cursor-shape change specified by the application.

Movie Controller Actions

Inside Macintosh lists all of the actions which are integer constants (defined by the mcAction data type) that can be requested of a movie controller component. Included are the actions used by applications, such as activating a movie or setting the audio volume, and actions recieved by action filter functions, which allow you to pre-empt the actions of a movie controller with your own functions. Over thirty actions are defined. QuickTime 3 Reference adds several new actions to the list:

Associating Movies With Controllers

Inside Macintosh defines the functions used to associate a controller with a movie. Most developers use these functions.

Managing Controller Attributes

Inside Macintosh defines the functions that are used to set and read the controller's attributes, such as whether the controller is visible, or whether the controller is attached to the movie. Most developers use these functions.

Handling Movie Events

Inside Macintosh defines the functions your application must call when an event occurs that might require action by the movie controller. A code sample is included, showing an event loop that routes events to the movie controller first, then acts on events that the movie controller has not handled. QuickTime 3 Reference adds a function for determining whether a point is within a movie controller and documents a new flag that can be returned by the MCGetControllerInfo function.

New:

Changed:

Original:

Editing Movies

Inside Macintosh defines the functions your application can use to edit movies using a movie controller component.

Getting and Setting Movie Controller Time

Inside Macintosh defines functions you can use to set the duration of a movie controller to an arbitrary value, or to read the time value represented by the slider in a movie controller.

Customizing Event Processing

Inside Macintosh defines functions your application can use to customize event processing by the movie controller. These functions return flags to your application indicating whether or not they handled an event, allowing your application to process events when necessary.

Application-Defined Function

Inside Macintosh defines the function your application can use to establish an action filter function, as discussed in the section Customizing Movie Controllers above.

Constants

Inside Macintosh lists the constants available to you for use with movie controller components. These constants primarily serve as flags to control movie controller settings. Note that movie controller actions, which are a kind of constant, are defined in the section Movie Controller Actions, above.

Data Types

Inside Macintosh defines the two data types associated with movie controller components: mcAction and MCFlags.

Result Codes

Inside Macintosh defines the result codes that can be returned by movie controller component functions in the event of an error.


© 1997 Apple Computer, Inc.